package com.mlk.engSystem.po;

import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mlk.core.constants.Constant;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author trekxu
 * @since 2019-06-21
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class EngPicBase implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 唯一标识(前台生成)
     */
    private String uniCode;
    /**
     * 分类
     */
    @NotBlank(message = "分类不能为空")
    private String category;
    /**
     * 品牌
     */
    @NotBlank(message = "品牌不能为空")
    private String branch;
    /**
     * 型号
     */
    @NotBlank(message = "型号不能为空")
    private String type;

    /**
     * 对应型号,对应业务参数表之后总的数据
     */
    @NotBlank(message = "对应型号不能为空")
    private String refType;

    /**
     * 含水重量
     */
    @NotNull(message = "含水重量不能为空")
    private BigDecimal containWaterWeight;

    /**
     * 不含水重量
     */
    @NotNull(message = "不含水重量不能为空")
    private BigDecimal noContainWaterWeight;

    /**
     * 时间码
     */
    @NotBlank(message = "对应型号不能为空")
    private String timeCode;
    @JsonFormat(pattern = Constant.DATE_TIME_FORMAT)
    private Date createTime;
    private String openId;



}
